#pragma once

#include <IXBaseObj.h>

class ExportXSkinLib IXMessageListener
{
public:
    IXMessageListener(){}
    virtual ~IXMessageListener(){}
    virtual LRESULT OnMessage(XWND xWnd, UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled) = 0;
};

class ExportXSkinLib IXMsgListenSrv : public IXBaseObj
{
    DEF_INTERFACE(IXMsgListenSrv, _T("{D5CBBE1F-3A7B-4513-BE87-D8A6520EF408}"));
public:
    virtual HRESULT STDMETHODCALLTYPE   AddMessageListener(UINT message, IXMessageListener* pListener) = 0;
    virtual HRESULT STDMETHODCALLTYPE   DelMessageListener(UINT message, IXMessageListener* pListener) = 0;

    virtual HRESULT STDMETHODCALLTYPE   AddMessageListener(XWND xWnd, UINT message, IXMessageListener* pListener) = 0;
    virtual HRESULT STDMETHODCALLTYPE   DelMessageListener(XWND xWnd, UINT message, IXMessageListener* pListener) = 0;

    virtual HRESULT STDMETHODCALLTYPE   AddMessageFilter(IXMessageListener* pFilter) = 0;
    virtual HRESULT STDMETHODCALLTYPE   DelMessageFilter(IXMessageListener* pFilter) = 0;

    virtual LRESULT STDMETHODCALLTYPE   InvokeMessageFilter(XWND xWnd, UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled) = 0;
    virtual LRESULT STDMETHODCALLTYPE   InvokeMessageListener(XWND xWnd, UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled) = 0;
};
